package Buffered_stream_package1;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class Buffered_stream_demo4 {
    public static void main(String[] args) throws IOException {
        /*
         *   字符缓冲输入流
         *       构造方法：
         *           public BufferedWriter (Writer r)
         *       特有方法：
         *           public void newLine ()      跨平台的换行
         */

        //1、创建字符缓冲输出流的对象
        BufferedWriter bw = new BufferedWriter(new FileWriter("/Users/zhaoxiaoyong/Documents/Java/" +
                "IO_stream_project/Buffered_stream_module/src/rough_draft/b.txt"));

        //2、写出数据
        bw.write("我真厉害！");
        bw.newLine();
        bw.write("牛逼牛逼大牛逼");
        bw.newLine();

        //3、释放资源
        bw.close();

    }
}
